#include<bits/stdc++.h>
using namespace std;
template<class T>void read(T &x)
{
	x=0;int f=0;char ch=getchar();
	while(ch<'0'||ch>'9'){ f|=(ch=='-'); ch=getchar(); }
	while(ch<='9'&&ch>='0') { x=(x<<1)+(x<<3)+(ch^48); ch=getchar(); }
	x = f ? -x : x;
	return ;
}

int n,m,q,u,v,t;
double p;

int h1,h2,h3,t1,t2,t3;
int qu1[7100010],qu2[7100010],qu3[7100010];

bool cmp(int a,int b) { return a>b; }

int main()
{
	freopen("earthworm.in","r",stdin);
	freopen("earthworm.out","w",stdout);
	read(n);read(m);read(q);read(u);read(v);read(t);
	p=(double)u/(double)v;
	for(int i=1;i<=n;++i) { read(qu1[i]); }
	sort(qu1+1,qu1+1+n,cmp);
	h1=1,t1=n+1;h2=1,t2=1;h3=1,t3=1;
	int k=1;
	for(int i=1;i<=m;++i)
	{
		int x=-0x3f3f3f3f,temp=0;
		if(h1<t1)
		{
			if(x<qu1[h1]+(i-1)*q) { x=qu1[h1]+(i-1)*q; temp=1;}
		}
		if(h2<t2)
		{
			if(x<qu2[h2]+(i-h2-1)*q) { x=qu2[h2]+(i-h2-1)*q; temp=2;}
		}
		if(h3<t3)
		{
			if(x<qu3[h3]+(i-h3-1)*q) { x=qu3[h3]+(i-h3-1)*q; temp=3;}
		}
		if(k*t==i) { printf("%d ",x);k++;}
		qu2[t2]=floor(x*p);
		t2++;
		qu3[t3]=x-(floor(x*p));
		t3++;
		if(temp==1)h1++;
		else if(temp==2)h2++;
		else if(temp==3)h3++;
	}
	printf("\n");
	k=1;
	for(int i=1;i<=n+m;++i)
	{
		int x=-0x3f3f3f3f,temp=0;
		if(h1<t1)
		{
			if(x<qu1[h1]+(m-1)*q) { x=qu1[h1]+(m)*q; temp=1;}
		}
		if(h2<t2)
		{
			if(x<qu2[h2]+(m-h2)*q) { x=qu2[h2]+(m-h2)*q; temp=2;}
		}
		if(h3<t3)
		{
			if(x<qu3[h3]+(m-h3)*q) { x=qu3[h3]+(m-h3)*q; temp=3;}
		}
		if(k*t==i) { printf("%d ",x); k++; }
		if(temp==1)h1++;
		else if(temp==2)h2++;
		else if(temp==3)h3++;
	}
	fclose(stdin);
	fclose(stdout);
	return 0;
}
